Fast computer startup

ABSTRACT

Fast computer startup is provided by, upon receipt of a shutdown command, recording state information representing a target state. In this target state, the computing device may have closed all user sessions, such that no user state information is included in the target state. However, the operating system may still be executing. In response to a command to startup the computer, this target state may be quickly reestablished from the recorded target state information. Portions of a startup sequence may be performed to complete the startup process, including establishing user state. To protect user expectations despite changes in response to a shutdown command, creation and use of the file holding the recorded state information may be conditional on dynamically determined events. Also, user and programmatic interfaces may provide options to override creation or use of the recorded state information.

RELATED APPLICATIONS

This application is a Continuation of and claims benefit from U.S.patent application Ser. No. 14/333,946 that was filed on Jul. 17, 2014,and that is a Continuation of U.S. patent application Ser. No.12/961,318 (U.S. Pat. No. 8,788,798), filed Dec. 6, 2010, (issued Jul.22, 2014), each of which is incorporated herein by reference in itsentirety.

BACKGROUND

Computers have several operating modes, ranging from full operation tofall shutdown. In full operation, software defining the executingportions of the operating system has been loaded from non-volatilememory into volatile memory, from which it can more quickly be executed.The computer enters this full operation mode though a “startup” process.The startup process configures the hardware and loads the operatingsystem of the computer. As part of the startup process, drivers areinstalled and operating system services are started.

Once the computer is ready for operation by any user, a user may log onto the computer. This log on may involve further configuration of thecomputer based on a profile specific to user who is logged on. Eitherautomatically or in response to user input, applications may then beloaded, such that the applications can execute, taking advantage of thecapabilities of the hardware and operating system services of thecomputing device.

In the process of loading software, whether for the operating system orapplications, memory may be allocated, parameters of the software may beassigned values based on the hardware configuration of the computer or auser profile, and other configuration actions may be performed.

These actions establish a “state” of the computing device. Furtherchanges to the memory and other parameters of the system that define itsoperating state may also be made as the user provides commands tointeract with executing applications or operating system services.

In full shutdown mode, power is not supplied to the hardware componentsof the computer. No software or state information is stored in volatilememory, as this memory does not retain information when it is poweredoff. Rather, any information that will be used later to re-configure thecomputer for a full operation mode is stored in non-volatile memory.

The computer enters shutdown mode through a process called shutdown.During shutdown, any information that may be needed to re-configure thecomputer, if it is not already stored in non-volatile memory, may bestored in non-volatile memory. Software and other configurationinformation that was copied into volatile memory from non-volatilememory is not copied back to non-volatile memory, because it can bere-created upon a subsequent startup process. However, to the extentthat the volatile memory caches data copied from non-volatile memorythat was modified after it was copied (sometimes called “dirty” data),that data is copied to non-volatile memory during shutdown.

A further variation is called log off. In a computer that supports usersessions, users may log on to the computer in order to access itsfunctionality. Though shutdown effectively logs off users, a separatelog off process may be performed following which the computer does notpower down. Rather, the operating system remains loaded and ready foranother user to log on. During logoff, the computer “breaks down” usersessions. Breaking down a user session may entail closing applicationslaunched by the user and storing user specific data not already innon-volatile memory.

In addition to a full shutdown or log off, there may be power savingmodes in which power to some or all of the hardware components of thecomputer is turned off. In a power saving mode, sometime called sleepmode, power is turned off for the computer processor, network interfacesand possibly other components. However, power is retained for volatilememory. In this way, any state information created during boot orsubsequent operation of the computer is retained in volatile memory.When power is supplied to the processor again, it may resume operationin the state where it left off upon entering sleep mode.

A further mode is sometimes called hibernate mode. The computer entersthis mode through a process called hibernation. During hibernation, afile capturing the operating state of the computer is created and storedin non-volatile memory, typically a hard disk. During a process ofresuming from hibernate, this file may be read from the disk and used tore-establish the state of the computer as it existed at the time ofhibernation. Resuming from hibernate restores in volatile memory copiesof software or parameters set during operation that existed at the timeof hibernating, such that any user state is also restored.

Resuming from hibernation can be faster than performing a full startupfor several reasons. One reason is that copying the state information inthe hibernation file into volatile memory re-creates the results of thefull startup process, while avoiding the time spent executing the stepsof the startup process, such as CPU consumption, device initializationand many other types of work that has to be done during boot.Additionally, the information accessed during startup is stored in manydifferent files, representing different components that are accessed toload and configure what may be potentially tens of thousands ofcomponents in the operating system. These components, and theinformation accessed to configure them, may be randomly distributedacross the hard disk. Because hard disk drives, and some other forms ofhigh capacity storage, are most efficient at accessing sequential data,accessing randomly distributed data may include substantial disk accesstime, leading to a long startup process. In contrast, the access time isless in reading the hibernation file because information in that filemay be stored sequentially on the disk.

A further difference between resuming from hibernation and startup isthat hibernating and then resuming restores the full state of thecomputer, including any user state for the user of the computer at thetime the computer hibernated. In contrast, until a user logs on, astartup will generically configure a computer for any user. Specificusers may then log on or otherwise take action to configure the computerfor themselves. For this reason, hibernation is generally selected by auser who intends to be away from a computer for a while, but intends toreturn to the computer. A shutdown is generally used by a user whointends to be away from the computer for a longer time, possibly notreturning to the computer at all or who expects other users may use thecomputer in the before the user returns.

SUMMARY

To improve a user experience, a computer may be configured to respond toa user command to shutdown by entering hibernate mode. Such a computermay be ready for operation by a user more quickly after the userprovides a command to startup the computer. To enable the computer toquickly be ready for operation in a state consistent with a user'sexpectation, a hibernation file captures a target state that implementsuser expectations. In response to a shutdown command, the computercreates this target state prior to hibernating by performing only aportion of the steps in a shutdown process. The steps performed mayplace the computer in the target state, corresponding to a state inwhich the operating system remains loaded, but user sessions have beenbroken down.

Upon receipt of a startup command, the computer system may, rather thancreating an operating state by loading and configuring software,re-create the target state by copying the hibernation file into volatilememory. The computer then may perform only portions of the startupsequence. Those portions may include the operations that wouldconventionally occur during a startup sequence after the operatingsystem is loaded. Those steps may include, for example, interacting witha user to perform a user log on and load applications that define a userstate.

In some embodiments, conditional processing may be performed in responseto a user command indicating a shutdown. The computing device maydetermine, for example, whether the computing device is in an operatingstate where a full shutdown is required or whether creating ahibernation file to use in response to a subsequent startup command isappropriate.

Such a state may be identified in any of a number of ways, including bydetermining that configuration settings of some installed component werechanged and will not be applied until the component again is loaded aspart of a full startup sequence. Alternatively, a programming interfacemay be provided that allows application components to register asrequiring a full shutdown.

If such a condition is detected, conventional shutdown processing may beperformed until the computing device is fully powered down. If not, theshutdown sequence may be performed until the computing device is in thetarget state, from which a hibernation file may be made.

In some embodiments, conditional processing may be performed in responseto a user command to startup. That conditional processing may includedetermining whether a hibernation file exists. If so, a further checkmay be made on whether it is possible that the target state of thecomputing device could have changed between the time when thehibernation file was created and the time at which the startup commandwas received. If events that could have caused a change in state aredetected, the computing device may perform a full startup sequence.

The foregoing is a non-limiting summary of the invention, which isdefined by the attached claims.

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings are not intended to be drawn to scale. In thedrawings, each identical or nearly identical component that isillustrated in various figures is represented by a like numeral. Forpurposes of clarity, not every component may be labeled in everydrawing. In the drawings:

FIG. 1 is a conceptual block diagram illustrating a startup sequence ina computing device;

FIG. 2 is a functional block diagram illustrating a resume fromhibernation sequence in a computing device;

FIG. 3 is a functional block diagram illustrating a fast startupsequence according to some embodiments of the invention;

FIG. 4 is a flow chart illustrating a method of operating a computer torespond to a startup command according to some embodiments of theinvention;

FIG. 5 is a flow chart of a method of operating a computing device torespond to a shutdown command according to some embodiments of theinvention;

FIG. 6 is a flow chart of a portion of a startup sequence that may beconditionally executed according to some embodiments of the invention;

FIG. 7 is a sketch of a portion of a graphical user interface throughwhich a user may select between commands that cause different behaviorsof a computing device upon shutdown; and

FIG. 8 is a block diagram of an exemplary computing device, illustratingan environment in which embodiments of the invention may operation.

DETAILED DESCRIPTION

The inventors have recognized and appreciated that an experience of auser of a computing device may be improved through the use of ahibernation file in conjunction with portions of a shutdown and/orstartup sequence of the computing device. Such a file may be createdselectively upon shutdown and used selectively upon startup such thatthe performance of the computing device matches user expectations. Evenwhen a hibernation file is created or used, portions of conventionalshutdown or startup sequences may be performed.

To provide operation of the computing device that is consistent withuser expectations, hibernation may be used in conjunction with portionsof a traditional shutdown sequence of the computing device that placesthe computing device in a target state. Those portions may include, uponreceipt of a shutdown command, operations that break down user sessions.In addition, as part of responding to a shutdown command, informationretained in volatile memory after user sessions are broken down, butthat is intended to be retained in non-volatile memory is moved tonon-volatile memory. For example, traditional cache flushing operationsthat mimic those performed during a conventional shutdown may beperformed.

Conversely, upon processing of a startup command, a resume fromhibernation may be performed along with portions of a startup sequence.That sequence may include any part of the startup sequence that occursafter the operating system is loaded and ready for operation. That partof the startup sequence may include user log on and loading ofapplications, for example.

Further, to provide operation consistent with user expectations,creation or use of a hibernation file as part of shutdown or startup maybe conditioned upon dynamically determined events. In scenarios in whicha component has been reconfigured during an operating session, such thatconfiguration changes are not applied until the next time the componentis loaded, no hibernation file may be created. In response to the nextstartup command from a user, the computer will detect that nohibernation file is available and create the target state by reloadingthe operating system. Alternatively or additionally, the operatingsystem may provide an interface through which other components canregister to signify that they require a full shutdown or startup tofunction effectively. When executing components are registered, a fullshutdown sequence may be performed in response to a shutdown command.

Further, to operate consistently with user expectations, in someembodiments, a user interface may be provided through which a user mayspecify whether to perform a conventional shutdown or a modifiedshutdown in which a target state is created and then the hibernationprocess is performed. Such a user interface may present separate optionsfor a conventional shutdown and a modified shutdown sequenceincorporating hibernation. A computing device may conditionally invokethe modified shutdown sequence in response to an input labeled as aconventional shutdown command. A separate command option may be providedthrough the interface with which a user may specify a conventionalshutdown.

Turning now to FIG. 1, a function block diagram of a full startupsequence is illustrated. FIG. 1 illustrates a functional block diagramof a computing device 100 that may be adapted to operate according toembodiments of the invention.

In this example, computing device 100 includes volatile memory 120.Volatile memory 120 may be implemented using DRAM or any other suitablememory components. A startup sequence performed by computing device 100involves creating state information within volatile memory 120 thatallows computing device 100 to perform computing operations as are knownin the art.

In this example, that state information is depicted as having twoportions, user state information 130 and system state information 140.System state information 140 represents the state information thatgenerically configures computing device 100 for operation by any user.In contrast, user state information 130 represents state informationthat may be generated when computing device 100 is operated orconfigured for operation by a specific user.

System state information 140 and user state information 130 may becreated in volatile memory 120 according to a startup process as isknown in the art. FIG. 1 illustrates, in simplified conceptual fashion,steps in a conventional startup sequence. Such a sequence may beinitiated, for example, when computing device 100 is powered on or othercommand signifying a startup is provided.

Computing device 100 may include components as are known in the art.Those components may include a processor 110. Processor 110 may beimplemented as a microprocessor or a collection of microprocessors orprocessor cores, as are known in the art. The operations describedherein may be the result of processor 110 executing softwareinstructions.

Additionally, computing device 100 may incorporate multiple types ofcomputer storage media. In this case, those types include volatilememory and non-volatile memory. In this example, volatile memory 120 isillustrated. Various types of information are stored in non-volatilememory 150 and 152. Boot memory 154 is also non-volatile memory.Different physical devices may be used to implement non-volatilememories 150 and 152 and boot memory 154. For example, non-volatilememory 150 may be a disk, such as a spinning hard disk or a solid statedrive. Non-volatile memory 152 may similarly be a disk, and may be thesame disk used to implement non-volatile memory 150, a differentpartition on the same disk or a different disk entirely.

Non-volatile memory 154 may likewise be a portion of the same deviceused to implement non-volatile memories 150 and 152. Though, in theembodiment illustrated, non-volatile memory 154 may be a non-volatilememory chip connected to processor 110. Accordingly, it should beappreciated that FIG. 1 represents just one example of a memoryarchitecture, and any suitable memory architecture may be used.

In this example, non-volatile and volatile memories are illustrated.Such a configuration represents a traditional computer architecture.Though, it is not a requirement that this specific architecture be used.Rather, volatile memory 120 is an example of operating memory. Duringoperation of computing device 100, processor 110 may predominantlyaccess the software and data to perform operations from volatile memory120. This memory may be relatively high speed such that operations maybe performed by processor 110 quickly.

In contrast, non-volatile memories, such as non-volatile memory 150 and152, may be capable of storing large quantities of data, but may operatemore slowly than volatile memory 120. Generally, the cost of storinginformation in such non-volatile memories may be relatively small incomparison to the cost of storing information in volatile memory 120. Toachieve cost effective, yet high speed operation, information may betransferred between non-volatile memories and the volatile memories.These transfers are performed to create a state within volatile memory120 that supports desired operation of computing device 100.

Other components of a computer system may be present, but are omittedfor simplicity. More detail of components that may be present in otherembodiments is provided below in connection with FIG. 8. However, thesimplified illustration in FIG. 1 is adequate for an explanation of astartup process.

In response to a startup command, processor 110 may access and executeinstructions in boot memory 154. Boot memory 154 may containinstructions that cause processor 110 to access non-volatile memories150 and 152 and, based on software and data stored in those memories,generate an appropriate state in volatile memory 120.

The instructions in boot memory 154 may cause processor 110 to loadsoftware from non-volatile memory 150. As part of loading softwarecomponents, processor 110 may transfer software instructions to volatilememory 120 from which that software may be executed. Though, loadingsoftware may include other operations, including execution of somecomponents.

Execution of some components from volatile memory 120 may transform thesoftware from the state in which it is stored to the state in which itis used or cause other components to be transferred from non-volatilememory to volatile memory 120. In the process of loading software,processor 110 may configure the software based on data stored innon-volatile memory 152 or other information. That information mayinclude, for example, information about hardware components installed incomputing device 100. Accordingly, FIG. 1 illustrates that a second andthird steps of the startup process may be to acquire software fromnon-volatile memory 150 and data from non-volatile memory 152.

The first software loaded in this process may establish system state140. The software initially loaded may add to the system state 140drivers 146, which control hardware components. Before loading a driver,hardware components associated with computing device 100 may beidentified and an appropriate driver may be selected. Once the driver isinstalled, operating system services, and other components, may interactwith the device controlled through the driver.

Operating system services 142 may then be loaded. One example of such aservice is file manager 144. File manager 144 may organize data involatile memory such that executing operating system services andapplications may access data in non-volatile memory organized accordingto files. Other services provided by an operating system may includeinteracting with a user interface, establishing a network connection orsending information to a printer. Though, the specific operating systemservices 142 is not a limitation on the invention.

Additionally, during the process of establishing the system state 140,processor 110 may store system state data 148. Such data may be copiedfrom non-volatile memory, such as non-volatile memory 152, or may begenerated by execution of software components. The data, for example,may be generated when processor 110 executes instructions that discoverdevices installed within computing device 100. As a specific example,upon discovering a specific network interface card, processor 110 mayrecord as part of system state data 148 a type or capabilities of thenetwork interface card. This data may then be used during operation ofthe computing device to control interactions with the network interfacecard. Though, it should be appreciated that the specific data stored assystem state data 148 is not critical to the invention.

Regardless of the specific operating system services 142 and systemstate data 148 that is created in system state information 140, whenthat system state information 140 is created, computing device 100 maybe ready for operation by a user. Accordingly, the startup sequence maycontinue with a process sometimes referred to as user log on. As part ofuser log on, a specific user may be identified and further stateinformation may be created in volatile memory 120 to allow computingdevice 100 to perform operations for that user. In this example, userstate information 130 is illustrated as containing applicationinstructions 132 and user state data 134.

As with the instructions representing operation system components andthe data representing system state, application instructions 132 may beloaded into memory based on software stored on volatile memory 150.Though, the process of loading software may entail executing functionsthat appropriately configure the software or computing device foroperation. That configuration may be dependent on system state data 148or user state data 134.

As just one example, upon loading application instructions implementinga web browser, processor 110 may access information representing userdata, either from non-volatile memory 152 or user state data 134, thatidentifies specific web sites that a user has identified as “favorites.”In this example, establishing user state data 130 configures the webbrowser for execution in accordance with user preferences, which willinclude presenting the list of the favorites customized for a specificuser that has logged on to computing device 100.

Once user log on is completed, the user may then interact with thecomputing device 100. These interactions may result in more softwarebeing loaded or some loaded applications being closed. Additionally,user interactions may set parameters or take other actions that canchange either user state 130 or system state 140. These interactions maycontinue until a user inputs a command indicating an intent to end thesession.

The session may be ended in one of multiple ways. For example, when auser completes a session of interaction with computing device 100, theuser may log off and/or shutdown computing device 100. Logoff results inthe user session being broken down such that user state information 130is no longer available in memory 120. Part of the log off sequence mayentail removing user specific settings from the system state 140. Inthis way, a second user may log on to computing device 100 without beinginfluenced by or being able to access state information generated by aprior user. The operations to achieve this result may sometimes bedescribed as breaking down a user session.

System state 140 may be retained following a logoff because power tomemory 120 may be maintained. In contrast, shutdown may result in bothuser state 130 and system state 140 being removed from volatile memory120. Because power is turned off to volatile memory 120, any informationin volatile memory 120 at the end of the shutdown sequence will be lost.Accordingly, any information needed to re-create that state, if notalready stored in no-volatile memory, may be moved to non-volatilememory.

Log off and/or shutdown sequences are not necessarily the reverse of thestartup sequence because there is no need to return any informationgenerated from non-volatile memories. That same information can begenerated again upon subsequent startup. However, portions of the userstate 130 that were dynamically generated during the session and cannotbe re-created from the information in non-volatile memory, may, as partof the log off or shutdown operation, be recorded in non-volatilememory. Similarly, upon shutdown, portions of the system state data 148that cannot be re-created upon re-execution of the startup sequence maybe transferred to non-volatile memory as part of the shutdown sequence.

As one example, system state data 148 may contain a cache, intended toact as a working copy of data items stored in non-volatile memory 152. Acache speeds up operation of computing device 100 by establishing involatile memory a copy of information that should be retained innon-volatile memory. Reading or writing information in a faster volatilememory location speeds up operation of the computing device incomparison to accessing that same data in non-volatile memory.

When a copy of data in volatile memory is changed, it no longer matchesthe corresponding data in non-volatile memory. The data in the cache issaid to be “dirty.” To keep the non-volatile memory synchronized withthe copy in the cache, dirty data is copied, from time-to-time, intonon-volatile memory. Usually, dirty data is copied back when thecomputer is not otherwise busy.

Though, delaying the copying of dirty data creates the possibility thatat shut down the data in the cache will not match what is innon-volatile memory. To avoid inconsistencies, prior to shutting downcomputing device 100, an operation, sometimes referred to as a flushingdirty data, may be performed. During this operation, dirty data iscopied to non-volatile storage.

Though the startup sequence illustrated in FIG. 1 is desirable becauseit configures computing device 100 for operation by a user, the startupsequence can, in some instances, be a source of frustration. Anoperating system and applications desired by a user may collectivelycontain thousands or tens of thousands of components. The startupsequence, therefore, may entail multiple read operations fromnon-volatile memories 150 and 152. Because these memories generallyoperate slowly, the overall process may be relatively slow.Additionally, a startup sequence may entail time consuming operationsother than storage-related operations. Additionally time may be spent,for example, on computations by the CPU or device initialization.

FIG. 2 illustrates an alternative approach for creating stateinformation in volatile memory. FIG. 2 illustrates computing device 100during a sequence of operation in which state information is created involatile memory 120 as part of a resume from hibernation sequence.

Hibernation is an operating mode that may be created by copying stateinformation from volatile memory to non-volatile memory. Such stateinformation may be organized any suitable way. In the embodimentillustrated in FIG. 2, that state information is illustrated as beingstored in hibernation file 210 in non-volatile memory 152. Duringhibernation, processor 110 may copy state information, including userstate information 130 and system state information 140, into hibernationfile 210. Hibernation mode is then entered by shutting off power to allor a portion of the components of computer system 100. When the power isshut off, state information in volatile memory 120 is lost. However, itmay be re-created as a resume from hibernation by copying thehibernation file into volatile memory.

Accordingly, FIG. 2 shows that the resume from hibernation sequence maybegin similarly to the startup sequence illustrated in FIG. 1 byprocessor 110 accessing instructions stored in boot memory 154. Thoseinstructions cause processor 110 to check for the presence ofhibernation file 210. In this example, upon detecting hibernation file210, processor 110 copies the contents of hibernation file 210 intovolatile memory 120. The copying may entail direct copying or may entailprocessing to transform the information in some way as it is copied,such as decompressing the file. Regardless of whether processing isperformed as part of the processing, the end result will result inrestoring state information. Once the state information is restored, auser may resume a computing session that was interrupted at the time ofhibernation. Both system state data 148 and user state data 134 will bereturned to volatile memory 120. Additionally, applications 132,operating system services 142 and drivers 146 will likewise be returnedto volatile memory 120 and ready for execution.

Frequently, a resume from hibernation will be faster than performing thefull startup sequence illustrated in connection with FIG. 1. Though thesame amount of information may ultimately be placed into volatile memory120 during a resume from hibernation and a full startup, simply copyingthat information from a file may be faster than generating it by loadingsoftware and configuration data.

However, entering hibernation mode and then resuming from hibernation isnot always a suitable substitute for performing a shut down and then astartup sequence. The Applicants have recognized and appreciated thatperforming a hibernation in response to a user command to shut down acomputing device and subsequently resuming from hibernation in responseto a command from a user to startup a computing device may not result inoperation of the computing device that meets the user's expectation.

The inventors have identified a way to provide a faster operatingexperience, without disrupting existing user expectations. FIG. 3illustrates a functional block diagram in which computing device 100 mayconditionally incorporate hibernation into a shut down sequence.Additionally, the computing device may conditionally incorporate aresume from hibernation in a startup sequence.

In the embodiment illustrated in FIG. 3, computing device 100 is shownto contain state information copied into non-volatile memory 152. Inthis embodiment, the state information is formatted as a hibernationfile 310. Hibernation file 310 may be in the form of a hibernation fileas is known in the art. Though it should be appreciated that anysuitable format may be used to store state information in non-volatilememory.

In contrast to the information stored in hibernation file 210,hibernation file 310 contains system state 140. User state 130 need notbe stored as part of hibernation file 310; though is some embodiments,portions of the user state may be stored. Accordingly, when a usersupplies a startup command to computing device 100, processor 110 maybegin executing instructions from boot memory 154, similar to whatoccurs in the operating mode illustrated in FIG. 2. Upon detecting thepresence of hibernation file 310, processor 110 may copy the contents ofhibernation file 310 into volatile memory 120. This copying re-createsthe system state 140 in volatile memory 120.

This state may mimic the state of computing device 100 during thestartup sequence illustrated in FIG. 1 after operating system softwareis loaded, but before a user log on occurs. Accordingly, to complete thecreation of state information in volatile memory 120, processor 110 mayperform steps of the startup sequence described above in connection withFIG. 1 that occur after system state is created. In this case, thoseoperations may include loading application instructions 132 and creatinguser state data 134 by reading software instructions from non-volatilememory 150 and configuring it based on data in non-volatile memory 152.Upon completion of these sequence of operations, the state informationin volatile memory 120 may be comparable to that loaded as a result ofexecuting the startup sequence as described above in connection withFIG. 1. However, the time required to respond to a startup command usingthe sequence illustrated in FIG. 3 may be shorter than that required toexecute a startup sequence as described in connection with FIG. 1.

In the example illustrated in FIG. 3, hibernation file 310, though ofthe same format as hibernation file 210 (FIG. 2), contains differentinformation. Additionally, hibernation file 310 is created in adifferent way than hibernation file 210. As described above, hibernationfile 210 (FIG. 2) records the state of computing device 100 asrepresented in volatile memory 120 at the time of a hibernation command.In contrast, hibernation file 310 is created in response to a shut downcommand. Though, the state information captured in hibernation file 310does not represent the full state of computing device 100 at the time ofthe shut down command.

Rather some processing may be performed to place computing device 100 ina target state, at which time the hibernation file 310 may be created.In the embodiment illustrated, the target state represents a state thatmay have been generated upon loading of an operating system but withouta user logging on to computing device 100. Such a target state may becreated, at least in part, by executing a portion of the shut downsequence. For example, that portion may include logging off a user orusers of computing device 100 or otherwise breaking down userconnections. Such processing may be performed using techniques as areknown in the art.

Other processing may alternatively or additionally be performed forplace computing device 100 in a target state. For example, processingmay include flushing dirty data from system state data 148.

Moreover, as noted above, to preserve a user expectation of the reactionof computing device 100 to a shut down command, a shut down sequenceinvolving hibernation may be conditionally performed based on conditionsthat may exist at the time. Similarly, a startup sequence mayconditionally involve a resume from hibernation. FIGS. 4, 5 and 6illustrate such conditional processing.

FIG. 4 illustrates a startup sequence such as may be performed bycomputing device 100 in response to a startup command. A startup commandmay, for example, by provided to computing device 100 by a user pressingan on button, supplying power to computing device 100 or otherwiseinitiating operation of computing device 100.

Regardless of the manner in which the startup sequence is initiated, theprocess may begin at block 410. At block 410, processor 110 may fetchand execute instructions from boot memory 154 that initiate the process.Though, in later steps of the process, instructions may be fetched fromnon-volatile memory 150 or from any other suitable source, includingfrom over a network connection.

Regardless of the source of the instructions used to control processor110 to initiate the startup sequence, the process may branch at decisionblock 412, depending on whether a hibernation file is detected innon-volatile memory 152. If so, the process may branch to terminationpoint A, to continue on with a process as illustrated in FIG. 6.Conversely, if no hibernation file exists, the process may proceed tosubprocess 450.

Subprocess 450 may represent a sequence of operations that implement astartup sequence generally as is known in the art. In this example, theprocessing at blocks 420, 422, 424, 426, 428, 430 and 432 may representprocessing as in a known startup sequence. Though, it should beappreciated that any suitable sequence of operations, using any suitabletechniques, may be used.

Regardless of the specific approach used, processing within subprocess450 may begin at block 420. At block 420, processor 110 executes anoperating system loader. Such a loader may be a software component that,when executed, loads components of an operating system from non-volatilememory 150 to volatile memory 120.

At block 422 operations that configure the image of the operating systembeing created as part of the system state 140 may be configured. Thisconfiguration may involve any suitable processing, including settingvalues of parameters of components loaded into volatile memory orexecuting instructions that configure other aspects of the system state140.

Also as part of the startup subprocess 450, computing device 100 maydetect devices. Any suitable devices may be detected, such as printers,network interfaces or other peripherals connected to computing device100. Based on the detected devices, a driver loader may be executed atblock 426. A driver loader may be a software component, constructedusing known techniques, that loads a driver. Execution of driver loadermay involve identifying and loading driver software for the detecteddevices. Once the drivers have been loaded, they may be started at block428. This processing may make the drivers and the devices that theycontrol available for use by other components loaded on computing device100.

The process may continue to block 430 where operating system servicesmay be started. Once the devices and services of the operating systemare available for use, processing may proceed to block 432. At block 432application components may be loaded. This processing may be performedat part of a user log on process, using techniques as are known in theart, or in any other suitable way.

As application components are loaded, the process illustrated in FIG. 4may branch depending on the nature of the application component loadedat block 432. Branching at decision block 444 allows for the computingdevice to ameliorate problems that might occur if one or moreapplication components does not operate properly when computing device100 performs a shutdown sequence using hibernation rather than aconventional shutdown sequence. Some components may require a reboot,meaning that a full startup sequence is performed when the computingdevice is next powered on such that state will be re-created using aloading process.

As an example, an application component that performs operationsdifferently depending on the time at which computing device 100 startsup may not perform as expected by a user if a shutdown sequenceincorporating hibernation as illustrated in FIG. 3 is performed. Forthose components, when a subsequent startup is performed, if thatstartup is performed based on a restore from hibernation, theapplication component may be configured based on state informationrestored from hibernation file 310. That state information may containan indication of a time when the computer last performed a full startupsequence. Accordingly, the application component being configured uponloading based on that state information will not be configured with atime value representing when the startup sequence illustrated in FIG. 4was initiated.

In contrast with possible user expectations, that component will beconfigured with a time value representing a prior time when the fullstartup sequence was performed. In this case, behavior of theapplication component will be based on a time that differs from a userexpectation because the user would expect the application component tobe configured based on the time that which the process of FIG. 4 began.

Accordingly, when such an application component is loaded on computingdevice 100, it may be desirable to determine that the component requiresa full shutdown sequence in response to a shutdown command from a user.When such a component is executing, the computing device may respond toa shutdown command by performing a full shutdown sequence. In this way,upon a subsequence receipt of a startup command, no hibernation filewill be available, and a full startup sequence, as illustrated, forexample, in FIG. 1, will be performed. At other times, the computingdevice may respond to a shutdown command with a shutdown sequenceincorporating hibernation as illustrated in FIG. 3.

To support such behavior consistent with user expectation, a mechanismmay be provided for an application program to designate that it requiresa full shutdown and full startup sequence to be performed. In theexample of FIG. 4, that mechanism may be implemented through anapplication programming interface (API) supported by the operatingsystem of computing device 100. Even application components that do not,in all instances, require a full shutdown and full startup sequence mayplace a call through such an API.

Accordingly, if it is determined at block 440 that an applicationcomponent being loaded requires a reboot, processing may branch to block442. At block 442, the application programming interface may be calledto register that application component. In this example, the API allowsthe operating system to track whether the application componentrequesting a reboot is still executing when a startup command issubsequently received. Though, it should be appreciated that such a callmay be made at any time. Any component, for example, that isreconfigured or otherwise encounters an operating state in which itdetermines a full shutdown and full startup sequence be performed maymake a call through the API.

If no such call is made through the API, when a shutdown command issubsequently received, the operating system may determine that ashutdown sequence, incorporating hibernation as illustrated in FIG. 3,may be used. Conversely, if a call has been made through the API tosignify a full shut down and full startup sequence are requested, theoperating system may perform a full shutdown sequence, without creatinga hibernation file such that, upon subsequent receipt of a startupcommand, a full startup sequence may be performed.

Any suitable mechanism may be used to determine whether an applicationcomponent needs a reboot, involving a full shutdown and subsequent fullstartup sequence. As one example, the application component may beprogrammed to call the API indicated at block 442. Alternatively, theoperating system may contain computer executable instructions to analyzeapplication components as they are being loaded to identify functionsthat may require a reboot. In that scenario, processing at decisionblock 440 may involve analyzing each application component as it isloaded. Though, any suitable techniques may be used at decision block440 to determine whether a reboot may be needed based on applicationcomponents loaded.

Though FIG. 4 illustrates determining whether a reboot is needed basedon application components loaded, similar processing may be performedfor other elements of computing device 100. For example, similarprocessing may be performed for operating system components.Alternatively or additionally, similar processing may be performed basedon devices installed in computing device 100 or to which computingdevice 100 is connected.

Regardless of the conditions identified at decision block 440 that mayindicate a need for a reboot, if those conditions are identified,processing may branch to block 442 where an indication is stored. Thatindication may trigger a full shutdown in response to a shutdown commandfrom a user or, alternatively or additionally, may trigger a fullstartup sequence in response to a user command to startup, even if ahibernation file is available. If those conditions are not detected,processing may proceed to block 444.

At block 444, data may be collected to allow computing device 100 todetermine the effectiveness of using a startup sequence thatincorporates hibernation, in this example, processing at block 444records the time to perform subprocess 450, which in this exampleindicates execution of a full startup sequence. This information may berecorded in any suitable way. For example, information on startup timemay be recorded in non-volatile memory 152. The information may berecorded as individual startup times, indicating a time required toperform a full startup sequence each time such a full startup sequenceis performed. Alternatively, the information may be recorded as arunning average over multiple full startup sequences, or in any othersuitable way.

Information on startup time may be determined in any suitable way atblock 444. As one example, a timer may be started at the initiation ofsubprocess 450 and read when processing reaches block 444. Though, othertime measurement techniques are known and may be applied at block 444.

Once the startup time is recorded, processing may proceed to block 446.Here, conventional operation of computing device 100 may occur. Suchoperation may continue until a shutdown command is received.

FIG. 5 illustrates processing that may be performed in response to sucha shutdown command. The process illustrated in FIG. 5 includes a block510, representing operation of computing device 100 using techniques asare known in the art. During operation, a shutdown command 512 may bereceived. Shutdown command 512 may be generated by user input in anysuitable way, such as through graphical user interface or a hardwarecontrol.

In some embodiments, computing device 100 may support multiple types ofuser input that can trigger a shutdown sequence. FIG. 7 is anillustration of a graphical user interface through which a user mayinput shutdown commands. In this example, the graphical user interface710 is invoked by pressing a button labeled “start” that appears on auser interface presented by a computer operating system. Though, itshould be appreciated that different operating systems support differentinterfaces and any suitable technique to invoke a user interface may beused.

In response to pressing that button, graphical user interface 710 may bepresented by an operating system, using techniques as are known in theart. Through graphical user interface 710, a user of computing device100 may select among multiple possible commands for ending a currentsession on the computing device. Here, three options are shown.

Command 714 is here labeled “shutdown.” Such a shutdown command isconventional on many computing devices and has traditionally been usedto indicate that the computing device should perform a full shutdownsequence. However, in the embodiment illustrated in FIG. 5, userselection of shutdown command 714 may result in the operating system ofcomputing device 100 determining whether a partial shutdown sequenceincorporating hibernation may instead be performed. In this embodiment,an operating system uses a label for a command having semantic meaningto a user in a way that is potentially inconsistent with that meaning.Nonetheless, the conditional processing preserves user expectations.

Though, if a user wants to ensure that a full shutdown sequence isperformed, a separate command, with a different label may be suppliedfor that reason. If a user desires to instruct the computing device toperform a full shutdown, without creating a hibernation file such that,upon a subsequent startup command, the operating system state will begenerated by loading software from non-volatile memory 150 andconfiguring it with data from non-volatile memory 152, the user mayselect command 715. In this example, command 715 is labeled “reboot.”Such a labeling is used to identify to a user that a full shutdownsequence will be performed such that, upon a subsequent startup command,a full startup sequence will be performed. In this case, command 715performs actions that are similar to those performed in a conventionalcomputing system when a “shutdown” command is issued. However, in thecomputing device presenting graphical user interface 710, the semanticlabel associated with a traditional shutdown command has been applied tocommand 714. Accordingly, command 715 is given a different label.

Graphical user interface 710 may also contain other options for ending auser session. In this example, graphical user interface 710 includes acommand 716. Upon selection of command 716, computing device 100 mayrespond by breaking down a session for a designated user. Such behaviorof a computing device is known in the art. In this case, command 716 maycorrespond to a conventional logoff command. Though, many suitablecommand options may be included in graphical user interface 710, in theembodiment illustrated, only selection of command 714 or 716 results ininitiation of the process illustrated in FIG. 5.

Regardless of the manner in which the shutdown command is received andits nature, in response to receipt of the command, processing maytransition from block 510 to block 514. At block 514, the beginningportions of a shutdown sequence may be performed. The portion of theshutdown sequence performed at block 514 may involve conventionalprocessing. In this example, the processing at block 514 ends any usersession or sessions on computing device 100. As described above inconnection with FIG. 1, such processing may involve closing applicationsand saving user state data 134 or performing any other suitable actions.As a result of those actions, any information in user state 130 that ispersisted from one user session to the next is moved from user statedata 134 to non-volatile memory, such as non-volatile memory 152.

Regardless of the specific steps taken to end user sessions or otherwisepersist user state data 134, when those steps are completed, processingmay proceed to decision block 516. At decision block 516, the process ofFIG. 5 may branch depending on whether a reboot has been requested.Processing at block 516 may be performed in any suitable way. Any one ormore criteria may be applied at decision block 516 to determine whethera reboot has been requested. As one example, user input may be used atdecision block 516 to determine whether a reboot has been requested. Forexample, when a user selects reboot command 715 (FIG. 7), that userselection may serve as an indication that a reboot has been requested.

As another example, it was described in connection with FIG. 4 that anapplication component may request a reboot, such as by calling an API atblock 442 (FIG. 4). If such a call has been made, processing at decisionblock 516 may determine that a reboot has been requested. Though in someembodiments, the processing at decision block 516 may be conditioned onmultiple criteria. For example, processing may determine that anapplication component has registered a request for a reboot through acall to an API at block 442. Further processing at decision block 516may determine whether such a request should be honored. Such processingmay include, for example, determining whether the requesting applicationcomponent is still executing at the time the process of FIG. 5 isexecuted. Alternatively or additionally, processing at decision block516 may entail determining whether the requesting component hassufficient access privileges to command a reboot.

Regardless of the nature of the processing performed at decision block516, if, as a result of that processing, it is determined that a reboothas been requested, the process branches to block 530. In this scenario,block 530 represents a full shutdown sequence. Such a full shutdownsequence may be performed as is known in the art. It may entail breakingdown user sessions, flushing dirty data and powering off the computingdevice. Regardless of the specific steps taken in performing theshutdown sequence, upon completion, the process of FIG. 5 may end,leaving computing device 100 in a powered off state.

Conversely, if a reboot has not been requested at decision block 516,the process may proceed to decision block 518. Processing at decisionblock 518 is an example of conditional processing to determine whether afull shutdown sequence should be performed or a partial shutdown,followed by hibernation should be performed. Generally, processing atdecision block 518 may entail application of any suitable policy. Such apolicy may be evaluated at the time a shutdown command is received.

In the example illustrated, the policy applied relates to time savingsachieved using hibernation. At decision block 518, it may be determinedwhether a time savings is achieved by starting up from hibernation. Sucha determination may be made by comparing recorded information aboutrelative times for placing computing device 100 in an operation statewith a full startup sequence or a resume from hibernation followed by apartial startup sequence. Information on a time for performing a fullstartup may be based, for example, on information stored at block 444(FIG. 4). Information on the time required to place computing device 100in an operational state following a resume from hibernation may bedetermined in a similar way based on information recorded at the end ofexecution of the process of FIG. 6.

If the times for creating an operating state based on a resume followedby a partial startup are slower than times for performing a fullstartup, the processing may branch from decision block 518 to subprocess530. Conversely, if processing at decision block 518 determines that aresume from hibernation followed by partial execution of a startupsequence is preferable, processing may proceed to decision block 520.

At decision block 520, further conditional processing may be performedto determine whether the computing device 100 is in a state appropriatefor a partial shutdown sequence incorporating hibernation. Suchprocessing may entail determining whether, during the current session,configuration changes were specified for any components. If suchconfiguration changes require a reboot to become effective, a shutdowninvolving hibernation may not implement user expectation for thebehavior of computing device 100 because selecting the shutdown command714 (FIG. 7) is associated with a label that traditionally would causethe computing device to apply configuration changes at the next startup.

If computing device 100 implements a shutdown sequence involvinghibernation in response to a command with a label traditionally used toindicate a full startup, upon a subsequent startup, the state of thosecomponents will resume their previous state rather than a state based onconfiguration changes. Accordingly, a scenario may exist in which userexpectations of invoking a command that might otherwise be associatedwith a full shutdown sequence will not exhibit expected behaviors. Toavoid computing device 100 operating in a way inconsistent with expecteduser behaviors, the process of FIG. 5 may branch depending on whetherthe computing device automatically determines that a full shutdownsequence should be performed in order to obtain operation consistentwith user expectations. If so, the process branches to subprocess 530,where a fall shutdown sequence is performed as described above.

In the embodiment illustrated, a condition under which a full shutdownsequence is to be performed is identified by determining whether anycomponents have had configuration settings changed during the currentsession. Techniques as are known in the art for making thisdetermination may be applied at decision block 520. As one example,processing to change configuration settings of executing components mayentail setting a flag or otherwise recording an indication of aconfiguration change. In that scenario, processing at decision block 520may entail checking the value of the status flag. Though, other suitableprocessing alternatively or additionally may be used. For example,processing may entail scanning one or more memory locations to detectunapplied configuration settings.

Regardless of how the determination is made at decision block 520, if nocondition exists under which a full shut down and/or subsequent fullstartup is required, processing may proceed to decision block 522. Atblock 522, operations to fully place computing device 100 in a targetstate from which hibernation occurs are performed. As described above inconnection with FIG. 3, that target state may correspond to a state inwhich the operating system state is maintained but all user sessionshave been broken down and any user state that is required uponsubsequent logon of the user has been persisted, in an appropriate form,in non-volatile memory.

An example of an operation that may be performed to achieve this targetstate is flushing dirty data. Alternatively or additionally, if otherdata stored as part of system state data 148 relates to a session of alogged on user, processing at block 522 may entail storing that data innon-volatile memory 152.

Regardless of what operations are performed to fully achieve the targetstate, processing may then proceed to block 524. Block 524, informationthat later may be used to ascertain the suitability of a hibernationfile for recreating a target state on computing device 100 may be taken.As an example, some computing devices may be configured with multipleoperating systems or multiple instances of an operating system. Ahibernation file created as part of shut down of a specific instance ofan operating system may be used to restore operating system state onlyin response to a command to startup the same instance of the operatingsystem.

However, the possibility that a computing device may be operated with anoperating system other than the one in use when the hibernation file wascreated creates a possibility that an operating system will be executingon the computing device between the time when a hibernation file wascreated and a subsequent startup command that would trigger re-creationof state based on that file. Intervening operation by another operatingsystem or instance of the same operating system may create thepossibility that the state captured in the hibernation file no longerrepresents the state of the computing device that should be created inorder to achieve operation consistent with user expectations.

For example, if a user has, after shutting down operation with a firstoperating system, loaded a second operating system and made changes toany data or other component used by the first operating system, resumingfrom a hibernation file in this instance will result in creating a statethat does not reflect the intervening user changes.

Accordingly, a mechanism may be employed to determine whether, upon asubsequent startup command, a hibernation file is suitable for use inrecreating the operating state of computing device 100. In theembodiment illustrated in FIG. 5, that mechanism entails storinginformation at the time the hibernation file is created. In thisspecific example, that information is a sequence number maintained by afile system. Specifically, the sequence number may be maintained by theNTFS file system or other file system that may be operating on acomputing device. Such a sequence number may be incremented each time atvolume of disk storage is loaded. Accordingly, processing at block 524may entail storing the NTFS sequence number associated with the volumecontaining the hibernation file and other data associated with theoperating system. This value may be stored in non-volatile memory suchthat it may be accessed in connection with a subsequent startup command.

Regardless of the specific information recorded at block 524 to allow asubsequent determination of the usability of a hibernation file, theprocess may proceed to subprocess 526. Subprocess 526 may involvestoring the hibernation file. Processing at block 526 may be performedusing conventional techniques associated with hibernation of a computingdevice. Though, it should be appreciated that any suitable techniqueperforming a hibernation file may be used.

Regardless of the specific technique used to store the hibernation fileas part of subprocess 526, upon storing the hibernation file, power maybe shut down to computing device 100. Computing device 100 may stay inthe powered down state until a startup command is received.

The subsequent startup command may be processed as illustrated in FIG. 4and FIG. 6. FIG. 4 illustrates processing that may be performed inresponse to receiving a start command. That processing includesprocessing at block 410 and at decision block 412. When processingreaches decision block 412, the process may branch, depending on whethera hibernation file exists, such as may exist if subprocess 526 wasperformed during the immediately preceding shutdown. When thathibernation file exists, the process of FIG. 4 may branch through theconnector labeled A to continue with processing as illustrated in FIG.6.

Processing at FIG. 6 illustrates a process that may be performed when ahibernation file exists. The process of FIG. 6 may begin at block 601.At block 601, the process may branch depending on whether thehibernation file detected at decision block 412 (FIG. 4) represents ahibernation file capturing a target state during a shut down such as isindicated in connection with subprocess 526. If it does, the process mayproceed to decision block 610.

Alternatively, the hibernation file may represent a conventionalhibernation file incorporating user state in addition to system stateinformation. Such a hibernation file may be used in accordance with aconventional technique to restore that state. The convention processingmay be performed at subprocess 670 where the hibernation file is used toreestablish a state of the computing device, including user state, atthe time of the prior hibernation. Following completion of subprocess670, processing may continue to block 638.

Conversely, if the hibernation file, as determined at decision block 601was recorded as part of a shutdown process, the process continues todecision block 610. Beginning at decision block 610, one or moreoperations may be performed to determine whether, in response to thestartup command, a full startup sequence should be performed or a resumefrom hibernation followed by a partial startup sequence should beperformed. In this example, multiple conditions are checked to determinewhether a resume from hibernation should be performed even though it isdetermined that a hibernation file exists. One such condition checked atdecision block 610 entails determining whether, for the computing device100, there has been a change in hardware configuration such that aresume from a hibernation may result in re-creating state informationthat does not match the current computer configuration. Such a changemay be detected in any suitable way, including checking an inventory ofhardware components that was created during a last session of thecomputing device and stored in non-volatile memory. The hardwareconfiguration of the computing device upon subsequent startup can becheck to ensure that each item on the inventor is installed. Though, itshould be appreciated that checking an inventory is only one example ofhow such processing may be performed. Regardless of how thedetermination is made, f the hardware configuration has changed, theprocessing may branch from decision block 610 to subprocess 650.Subprocess 650 may entail reloading the operating system. Processing atsubprocess 650 may be performed using techniques as are known in theart. Following loading of the operating system in subprocess 650, theprocess may proceed to block 632.

Conversely, if processing at decision block 610 determines that nohardware configuration occurred, processing may proceed to block 612. Atblock 612, further processing may be performed to dynamically determinewhether computing device 100 is in a state from which a resume fromhibernation is to be performed. In this case, processing at decisionblock 612 may make use of information stored at block 524 (FIG. 5) todetermine whether changes that occurred between the creation of thehibernation file such that user expectations would not be met if aresume from hibernation were performed.

In this example, processing at block 612 involves checking the NTFSsequence number associated with the volume containing the hibernationfile. If that volume has not been loaded since the hibernation file wascreated, the sequence number read at block 612 will differ from thesequence number stored at block 524 by a known amount representing achance in the sequence number upon startup. Conversely, if thedifference in sequence numbers is greater than the known amount,processing at block 612 will identify that changes possibly were madebetween the time of the creation of the hibernation file and the startupcommand that triggered the resume from hibernation.

At decision block 620, the process may branch based on the comparisonperformed at block 612. If the sequence numbers are not consistent, theprocess branches to subprocess 750. Such a branch may occur when adifference in the sequence numbers indicates that the hibernation filemay not establish an operating state of the computing device that isconsistent with user expectations. Accordingly, subprocess 650 isperformed in which the system state 140 is created by reloadingoperating system software.

Conversely, if the comparison performed at block 612 indicates that thesequence numbers are consistent, the process may proceed to subprocess630. When that branch is taken, the hibernation file has been determinedto be appropriate for re-establishing the state of the computing device.Accordingly, subprocess 630 entails re-establishing the target state ofthe computing device from the hibernation file. Subprocess 630 may beperformed using known techniques for resuming from hibernation. Though,in this scenario, rather than reestablishing a state of the computingdevice including a user state, resuming based on the hibernation filere-creates the target state at the time the hibernation file wascreated. This state for example may represent the state of the computingdevice at the start of subprocess 526 (FIG. 5). Though, in otherembodiments, partial user state may be stored in the hibernation file,such as may occur when the operating system predicts applications likelyto be opened by a user upon completion of a startup sequence and storesthe hibernation file to capture the state of the computing device whilethose applications are still open.

Upon completion of subprocess 630, the process of FIG. 6 may proceed toblock 632. Regardless of whether processing arrives at block 632 throughsubprocess 630 or 650, at block 632

a time required to respond to a start-up command may be recorded. Themeaning of the value recorded may depend on the path by which processingreached block 632. When processing arrives at block 632 throughsubprocess 630, the time represents the time for startup using a resumefrom hibernation as part of the processing, and is recorded accordingly.Conversely, when processing arrives at block 632 through subprocess 650,the time represents the time for startup using a full startup sequence,and is recorded accordingly. Processing at block 632 may be performed atany suitable way, including using techniques as describe in connectionwith block 444 (FIG. 4).

As a result of recording information at block 632, processing atdecision block 518 (FIG. 5) may have information available to comparethe time to respond to a startup command based on a full startupsequence that includes a resume from hibernation and a portion of thestartup sequence. This information may be recorded and compared in anysuitable way.

Processing may then proceed to subprocess 634. At subprocess 634, aportion of a startup sequence may be performed to create a desiredoperating state for the computing device. This portion may includelogging on a user. This operation may be performed in a known way andmay include automated log on or may include presenting a log on screenthrough which a user may present information to manually perform a logon process. In scenarios in which processing arrived at subprocess 634through subprocess 650, the combination of processing at subprocess 650and subprocess 634 may represent a full startup sequence. Conversely, ifprocessing arrives at subprocess 634 through subprocess 630, theresponse to the startup command involves a resume from hibernation and aportion of the startup sequence.

In this example, that portion of the startup sequence represents loggingon a user in subprocess 634. Such processing may be performed usingconventional techniques. Though, the specific steps used to complete thestartup sequence following a resume from hibernation may be any suitabletechniques.

The process may then proceed to block 638, where the hibernation filemay be invalidated. Processing may also arrive at block 638 followingsubprocess 670. Regardless of how processing arrives at block 638. Thehibernation file may be invalidated in any suitable way that indicatesthat the hibernation file is not to be later used when it mightre-create an incorrect operating state. The hibernation file may beinvalidated, for example, by altering its contents in some way,recording in a separate memory structure that the file is invalid or bydeleting the file.

The process of FIG. 6 may then end. When the process ends, computingdevice 100 may be configured in an operating state and may thereaftercontinue operating until a shutdown or reboot command is received.

FIG. 8 illustrates an example of a suitable computing system environment800 on which the invention may be implemented. The computing systemenvironment 800 is only one example of a suitable computing environmentand is not intended to suggest any limitation as to the scope of use orfunctionality of the invention. Neither should the computing environment800 be interpreted as having any dependency or requirement relating toany one or combination of components illustrated in the exemplaryoperating environment 800.

The invention is operational with numerous other general purpose orspecial purpose computing system environments or configurations.Examples of well known computing systems, environments, and/orconfigurations that may be suitable for use with the invention include,but are not limited to, personal computers, server computers, hand-heldor laptop devices, multiprocessor systems, microprocessor-based systems,set top boxes, programmable consumer electronics, network PCs,minicomputers, mainframe computers, distributed computing environmentsthat include any of the above systems or devices, and the like.

The computing environment may execute computer-executable instructions,such as program modules. Generally, program modules include routines,programs, objects, components, data structures, etc. that performparticular tasks or implement particular abstract data types. Theinvention may also be practiced in distributed computing environmentswhere tasks are performed by remote processing devices that are linkedthrough a communications network. In a distributed computingenvironment, program modules may be located in both local and remotecomputer storage media including memory storage devices.

With reference to FIG. 8, an exemplary system for implementing theinvention includes a general purpose computing device in the form of acomputer 810. Components of computer 810 may include, but are notlimited to, a processing unit 820, a system memory 830, and a system bus821 that couples various system components including the system memoryto the processing unit 820. The system bus 821 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, and a local bus using any of a variety of busarchitectures. By way of example, and not limitation, such architecturesinclude Industry Standard Architecture (ISA) bus, Micro ChannelArchitecture (MCA) bus, Enhanced ISA (EISA) bus, Video ElectronicsStandards Association (VESA) local bus, and Peripheral ComponentInterconnect (PCI) bus also known as Mezzanine bus.

Computer 810 typically includes a variety of computer readable media.Computer readable media can be any available media that can be accessedby computer 810 and includes both volatile and nonvolatile media,removable and non-removable media. By way of example, and notlimitation, computer readable media may comprise computer storage mediaand communication media. Computer storage media includes both volatileand nonvolatile, removable and non-removable media implemented in anymethod or technology for storage of information such as computerreadable instructions, data structures, program modules or other data.Computer storage media includes, but is not limited to, RAM, ROM,EEPROM, flash memory or other memory technology, CD-ROM, digitalversatile disks (DVD) or other optical disk storage, magnetic cassettes,magnetic tape, magnetic disk storage or other magnetic storage devices,or any other medium which can be used to store the desired informationand which can accessed by computer 810. Communication media typicallyembodies computer readable instructions, data structures, programmodules or other data in a modulated data signal such as a carrier waveor other transport mechanism and includes any information deliverymedia. The term “modulated data signal” means a signal that has one ormore of its characteristics set or changed in such a manner as to encodeinformation in the signal. By way of example, and not limitation,communication media includes wired media such as a wired network ordirect-wired connection, and wireless media such as acoustic, RF,infrared and other wireless media. Combinations of the any of the aboveshould also be included within the scope of computer readable media.

The system memory 830 includes computer storage media in the form ofvolatile and/or nonvolatile memory such as read only memory (ROM) 831and random access memory (RAM) 832. A basic input/output system 833(BIOS), containing the basic routines that help to transfer informationbetween elements within computer 810, such as during startup, istypically stored in ROM 831. RAM 832 typically contains data and/orprogram modules that are immediately accessible to and/or presentlybeing operated on by processing unit 820. By way of example, and notlimitation, FIG. 8 illustrates operating system 834, applicationprograms 835, other program modules 836, and program data 837.

The computer 810 may also include other removable/non-removable,volatile/nonvolatile computer storage media. By way of example only,FIG. 8 illustrates a hard disk drive 840 that reads from or writes tonon-removable, nonvolatile magnetic media, a magnetic disk drive 851that reads from or writes to a removable, nonvolatile magnetic disk 852,and an optical disk drive 855 that reads from or writes to a removable,nonvolatile optical disk 856 such as a CD ROM or other optical media.Hard disk drive 840 may be implemented as a spinning magnetic mediumthat contains one or more magnetic heads that can write to or read fromthe magnetic media. Other removable/non-removable, volatile/nonvolatilecomputer storage media that can be used in the exemplary operatingenvironment include, but are not limited to, magnetic tape cassettes,flash memory cards, digital versatile disks, digital video tape, solidstate RAM, solid state ROM, and the like. The hard disk drive 841 istypically connected to the system bus 821 through an non-removablememory interface such as interface 840, and magnetic disk drive 851 andoptical disk drive 855 are typically connected to the system bus 821 bya removable memory interface, such as interface 850.

The drives and their associated computer storage media discussed aboveand illustrated in FIG. 8, provide storage of computer readableinstructions, data structures, program modules and other data for thecomputer 810. In FIG. 8, for example, hard disk drive 841 is illustratedas storing operating system 844, application programs 845, other programmodules 846, and program data 847. Note that these components can eitherbe the same as or different from operating system 834, applicationprograms 835, other program modules 836, and program data 837. Operatingsystem 844, application programs 845, other program modules 846, andprogram data 847 are given different numbers here to illustrate that, ata minimum, they are different copies. A user may enter commands andinformation into the computer 810 through input devices such as akeyboard 862 and pointing device 861, commonly referred to as a mouse,trackball or touch pad. Other input devices (not shown) may include amicrophone, joystick, game pad, satellite dish, scanner, or the like.These and other input devices are often connected to the processing unit820 through a user input interface 860 that is coupled to the systembus, but may be connected by other interface and bus structures, such asa parallel port, game port or a universal serial bus (USB). A monitor891 or other type of display device is also connected to the system bus821 via an interface, such as a video interface 890. In addition to themonitor, computers may also include other peripheral output devices suchas speakers 897 and printer 896, which may be connected through anoutput peripheral interface 895.

The computer 810 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer880. The remote computer 880 may be a personal computer, a server, arouter, a network PC, a peer device or other common network node, andtypically includes many or all of the elements described above relativeto the computer 810, although only a memory storage device 881 has beenillustrated in FIG. 8. The logical connections depicted in FIG. 8include a local area network (LAN) 871 and a wide area network (WAN)873, but may also include other networks. Such networking environmentsare commonplace in offices, enterprise-wide computer networks, intranetsand the Internet.

When used in a LAN networking environment, the computer 810 is connectedto the LAN 871 through a network interface or adapter 870. When used ina WAN networking environment, the computer 810 typically includes amodem 872 or other means for establishing communications over the WAN873, such as the Internet. The modem 872, which may be internal orexternal, may be connected to the system bus 821 via the user inputinterface 860, or other appropriate mechanism. In a networkedenvironment, program modules depicted relative to the computer 810, orportions thereof, may be stored in the remote memory storage device. Byway of example, and not limitation, FIG. 8 illustrates remoteapplication programs 885 as residing on memory device 881. It will beappreciated that the network connections shown are exemplary and othermeans of establishing a communications link between the computers may beused.

Having thus described several aspects of at least one embodiment of thisinvention, it is to be appreciated that various alterations,modifications, and improvements will readily occur to those skilled inthe art.

For example, it is described that a determination is made upon startupof whether to perform a full startup sequence or a resume fromhibernation followed by a portion of a startup sequence based onrelative times observed for performing each sequence. It should beappreciated that similar processing could be performed at shutdown. Ifperformed at shutdown, the decision could be implemented by storing ornot storing a hibernation file. Accordingly, it should be appreciatedthat operations described as occurring upon startup may alternatively beperformed upon shutdown, and vice versa.

Benefits as described above may be achieved in other ways. For example,in addition to avoiding work by a computer's CPU and other components,such as a disk, during a process of setting up state, such an approachallows data to be saved in a hibernation file in response to a shutdowncommand that will help speed up a user's experience during a response toa subsequent startup command and/or after processing of the startupcommand has been completed. For example, when the user logs on, a numberof applications may be launched (e.g. WINDOWS EXPLORER web browser,startup apps, etc). An operating system may explicitly track files (andtheir offsets) that a user accesses during a defined interval afterprocessing of a startup command is completed. Those applications, orother components, can be read into memory to be saved into thehibernation filed created during a subsequent processing of a shutdowncommand. In this way, these applications, or other components, will beread sequentially from disk into memory instead of having to read itrandomly as part of launching those applications.

Also, user log on and log off is described. It should be appreciatedthat a shutdown command may be provided in scenarios on which multipleusers are logged onto a computer. If a shutdown sequence is partiallyperformed and then a hibernation operation is performed, the partialshutdown sequence may result in log off of multiple users, buttechniques as described above may nonetheless be applied.

For example, techniques as described herein may be used to provideautomated servicing without user intervention. For example, a computingdevice that has responded to a shutdown command by performing a partialshutdown sequence and then hibernating, may be configured toautomatically wake at a time when user activity is not expected, such asin the middle of the night. Upon awaking, the computing device mayperform maintenance activities, such as applying software updates. Tothe user, it appears as if the computing device was shutdown at the endof the day, such that the maintenance activities are transparent to theuser. Such a capability may be implemented, for example, if thecomputing device, in response to a shutdown command, detects that it hasmaintenance activity or patches to apply and arms itself to wake at anopportune time. When it wakes up, the computing device performs whatevermaintenance activity, such as applying patches, is necessary. The systemthen does a full restart and then again performs a partial shutdownfollowed by a hibernation. This scenario enables a software vendor tooffer a solution that makes maintenance activity invisible to the user.This capability can be applied to both consumers and to enterprise PCs.In addition to improving the user experience, such an approach may alsosave power, particularly for enterprise users.

Such alterations, modifications, and improvements are intended to bepart of this disclosure, and are intended to be within the spirit andscope of the invention. Accordingly, the foregoing description anddrawings are by way of example only.

The above-described embodiments of the present invention can beimplemented in any of numerous ways. For example, the embodiments may beimplemented using hardware, software or a combination thereof. Whenimplemented in software, the software code can be executed on anysuitable processor or collection of processors, whether provided in asingle computer or distributed among multiple computers. Such processorsmay be implemented as integrated circuits, with one or more processorsin an integrated circuit component. Though, a processor may beimplemented using circuitry in any suitable format.

Further, it should be appreciated that a computer may be embodied in anyof a number of forms, such as a rack-mounted computer, a desktopcomputer, a laptop computer, or a tablet computer. Additionally, acomputer may be embedded in a device not generally regarded as acomputer but with suitable processing capabilities, including a PersonalDigital Assistant (PDA), a smart phone or any other suitable portable orfixed electronic device.

Also, a computer may have one or more input and output devices. Thesedevices can be used, among other things, to present a user interface.Examples of output devices that can be used to provide a user interfaceinclude printers or display screens for visual presentation of outputand speakers or other sound generating devices for audible presentationof output. Examples of input devices that can be used for a userinterface include keyboards, and pointing devices, such as mice, touchpads, and digitizing tablets. As another example, a computer may receiveinput information through speech recognition or in other audible format.

Such computers may be interconnected by one or more networks in anysuitable form, including as a local area network or a wide area network,such as an enterprise network or the Internet. Such networks may bebased on any suitable technology and may operate according to anysuitable protocol and may include wireless networks, wired networks orfiber optic networks.

Also, the various methods or processes outlined herein may be coded assoftware that is executable on one or more processors that employ anyone of a variety of operating systems or platforms. Additionally, suchsoftware may be written using any of a number of suitable programminglanguages and/or programming or scripting tools, and also may becompiled as executable machine language code or intermediate code thatis executed on a framework or virtual machine.

In this respect, the invention may be embodied as a computer readablestorage medium (or multiple computer readable media) (e.g., a computermemory, one or more floppy discs, compact discs (CD), optical discs,digital video disks (DVD), magnetic tapes, flash memories, circuitconfigurations in Field Programmable Gate Arrays or other semiconductordevices, or other non-transitory, tangible computer storage medium)encoded with one or more programs that, when executed on one or morecomputers or other processors, perform methods that implement thevarious embodiments of the invention discussed above. The computerreadable storage medium or media can be transportable, such that theprogram or programs stored thereon can be loaded onto one or moredifferent computers or other processors to implement various aspects ofthe present invention as discussed above. As used herein, the term“non-transitory computer-readable storage medium” encompasses only acomputer-readable medium that can be considered to be a manufacture(i.e., article of manufacture) or a machine. Alternatively oradditionally, the invention may be embodied as a computer readablemedium other than a computer-readable storage medium, such as apropagating signal.

The terms “program” or “software” are used herein in a generic sense torefer to any type of computer code or set of computer-executableinstructions that can be employed to program a computer or otherprocessor to implement various aspects of the present invention asdiscussed above. Additionally, it should be appreciated that accordingto one aspect of this embodiment, one or more computer programs thatwhen executed perform methods of the present invention need not resideon a single computer or processor, but may be distributed in a modularfashion amongst a number of different computers or processors toimplement various aspects of the present invention.

Computer-executable instructions may be in many forms, such as programmodules, executed by one or more computers or other devices. Generally,program modules include routines, programs, objects, components, datastructures, etc. that perform particular tasks or implement particularabstract data types. Typically the functionality of the program modulesmay be combined or distributed as desired in various embodiments.

Also, data structures may be stored in computer-readable media in anysuitable form. For simplicity of illustration, data structures may beshown to have fields that are related through location in the datastructure. Such relationships may likewise be achieved by assigningstorage for the fields with locations in a computer-readable medium thatconveys relationship between the fields. However, any suitable mechanismmay be used to establish a relationship between information in fields ofa data structure, including through the use of pointers, tags or othermechanisms that establish relationship between data elements.

Various aspects of the present invention may be used alone, incombination, or in a variety of arrangements not specifically discussedin the embodiments described in the foregoing and is therefore notlimited in its application to the details and arrangement of componentsset forth in the foregoing description or illustrated in the drawings.For example, aspects described in one embodiment may be combined in anymanner with aspects described in other embodiments.

Also, the invention may be embodied as a method, of which an example hasbeen provided. The acts performed as part of the method may be orderedin any suitable way. Accordingly, embodiments may be constructed inwhich acts are performed in an order different than illustrated, whichmay include performing some acts simultaneously, even though shown assequential acts in illustrative embodiments.

Use of ordinal terms such as “first,” “second,” “third,” etc., in theclaims to modify a claim element does not by itself connote anypriority, precedence, or order of one claim element over another or thetemporal order in which acts of a method are performed, but are usedmerely as labels to distinguish one claim element having a certain namefrom another element having a same name (but for use of the ordinalterm) to distinguish the claim elements.

Also, the phraseology and terminology used herein is for the purpose ofdescription and should not be regarded as limiting. The use of“including,” “comprising,” or “having,” “containing,” “involving,” andvariations thereof herein, is meant to encompass the items listedthereafter and equivalents thereof as well as additional items.

What is claimed is:
 1. A method performed on a computing device, the method comprising: initiating, by the computing device, a startup sequence of an instance of an operating system of the computing device; detecting, by the computing device in response to the initiating, a hibernation file that corresponds to a prior shutdown sequence of the instance of the operating system; determining, by the computing device, that no other instance of the operating system or instance of another operating system of the computing device has been started since the detected hibernation file was created; and completing, by the computing device in response to the determining and based on the detected hibernation file, the startup sequence.
 2. The method of claim 1 where the determining is based at least in part on information stored in the detected hibernation file.
 3. The method of claim 1 where the completing is further based on determining that the detected hibernation file does not include any user state information.
 4. The method of claim 1 where the completing is further based on determining that a hardware configuration of the computing device has not changed since the detected hibernation file was created.
 5. The method of claim 1 where the completing is further based on determining that a volume comprising the detected hibernation file has not been loaded since the detected hibernation file was created.
 6. The method of claim 1 where the completing the startup sequence comprises re-establishing a system state of the computing device without any prior user state of the computing device.
 7. The method of claim 1 where the completing the startup sequence comprises re-establishing a system state of the computing device and only partial user state of any prior user state of the computing device.
 8. A system comprising a computing device and at least one program module that are together configured for performing actions comprising: initiating, by the computing device, a startup sequence of an instance of an operating system of the computing device; detecting, by the computing device in response to the initiating, a hibernation file that corresponds to a prior shutdown sequence of the instance of the operating system; determining, by the computing device, that no other instance of the operating system or instance of another operating system of the computing device has been started since the detected hibernation file was created; and completing, by the computing device in response to the determining and based on the detected hibernation file, the startup sequence.
 9. The system of claim 8 where the determining is based at least in part on information stored in the detected hibernation file.
 10. The system of claim 8 where the completing is further based on determining that the detected hibernation file does not include any user state information.
 11. The system of claim 8 where the completing is further based on determining that a hardware configuration of the computing device has not changed since the detected hibernation file was created.
 12. The system of claim 8 where the completing is further based on determining that a volume comprising the detected hibernation file has not been loaded since the detected hibernation file was created.
 13. The system of claim 8 where the completing the startup sequence comprises re-establishing a system state of the computing device without any prior user state of the computing device.
 14. The system of claim 8 where the completing the startup sequence comprises re-establishing a system state of the computing device and only partial user state of any prior user state of the computing device.
 15. At least one computer-readable storage device storing computer executable instructions that, when executed by a computing device, cause the computing device to perform actions comprising: initiating, by the computing device, a startup sequence of an instance of an operating system of the computing device; detecting, by the computing device in response to the initiating, a hibernation file that corresponds to a prior shutdown sequence of the instance of the operating system; determining, by the computing device, that no other instance of the operating system or instance of another operating system of the computing device has been started since the detected hibernation file was created; and completing, by the computing device in response to the determining and based on the detected hibernation file, the startup sequence.
 16. The at least one computer-readable storage device of claim 15 where the determining is based at least in part on information stored in the detected hibernation file.
 17. The at least one computer-readable storage device of claim 15 where the completing is further based on determining that the detected hibernation file does not include any user state information.
 18. The at least one computer-readable storage device of claim 15 where the completing is further based on determining that a hardware configuration of the computing device has not changed since the detected hibernation file was created.
 19. The at least one computer-readable storage device of claim 15 where the completing is further based on determining that a volume comprising the detected hibernation file has not been loaded since the detected hibernation file was created.
 20. The at least one computer-readable storage device of claim 15 where the completing the startup sequence comprises re-establishing a system state of the computing device without any prior user state of the computing device, or where the completing the startup sequence comprises re-establishing a system state of the computing device and only partial user state of any prior user state of the computing device. 